<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html>
<html lang="zh">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width,initial-scale=1,user-scalable=no,minimal-ui">
    <meta content="telephone=no" name="format-detection" />
    <meta content="email=no" name="format-detection" />
    <meta name="wap-font-scale" content="no">  <!--解决UC字体忽然变大-->
    <meta http-equiv="x-ua-compatible" content="IE=edge,chrome=1">
    
        <?php if(!empty($page["title"])): ?><title><?php echo ($page["title"]); ?></title>
            <?php else: ?>
            <title><?php echo ($setting["sitename"]); ?></title><?php endif; ?>
    
    <?php if(!empty($page["keywords"])): ?><meta name="keywords" content="<?php echo ($page["keywords"]); ?>"/>
        <?php else: ?>
        <meta name="keywords" content="<?php echo ($setting["keywords"]); ?>"/><?php endif; ?>
    <?php if(!empty($page["description"])): ?><meta property="description" name="description" content="<?php echo ($page["description"]); ?>"/>
        <?php else: ?>
        <meta property="description" name="description" content="<?php echo ($setting["description"]); ?>"/><?php endif; ?>

    
        <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><!--bootstrap组件--><link rel="stylesheet" href="/Public/bootstrap/bootstrap.min.css" ><script src="/Public/bootstrap/jquery.min.js" ></script><script src="/Public/bootstrap/popper.min.js"></script><script src="/Public/bootstrap/bootstrap.min.js"></script><!--awesome字体--><link href="/Public/bootstrap/font/css/font-awesome.min.css" rel="stylesheet"><!--bootstrap-dialog--><script src="/Public/bootstrap/bootstrap.dialog.js"></script><!--拖拽--><!--<script type="text/javascript" src="/Public/Plugs/jq/jquery-ui.min.js"></script>--><!--文件上传--><!--<link rel="stylesheet" type="text/css" href="/Public/Plugs/uploadify/uploadify.css"><script type="text/javascript" src="/Public/Plugs/uploadify/jquery.uploadify.min.js"></script>--><!--滚动条--><!--<link rel="stylesheet" type="text/css" href="/Public/Plugs/mCustomScrollbar/jquery.mCustomScrollbar.css"/><script type="text/javascript" src="/Public/Plugs/mCustomScrollbar/jquery.mCustomScrollbar.js"></script>--><!--颜色选择器--><link rel="stylesheet" type="text/css" href="/Public/Plugs/spectrum/spectrum.css"><script type="text/javascript" src="/Public/Plugs/spectrum/spectrum.js"></script><!--弹出框--><script type="text/javascript" src="/Public/Plugs/jq/jquery-dialog.js"></script><!--新日历控件,来源  http://blog.csdn.net/binyao02123202/article/details/42066035--><!--<link rel="stylesheet" type="text/css" href="/Public/Plugs/calendar/cxcalendar.css"/><script type="text/javascript" src="/Public/Plugs/calendar/calendar.js"></script>--><!--日期选择器插件datetimepicker--><link rel="stylesheet" href="/Public/Plugs/flatpickr/flatpickr.min.css"><script type="text/javascript" src="/Public/Plugs/flatpickr/flatpickr.js"></script><script type="text/javascript" src="/Public/Plugs/flatpickr/zh.js?v=3"></script><!--文件上传-插件地址：https://github.com/danielm/uploader--><script src="/Public/Plugs/dmuploader/jquery.dm-uploader.js"></script><!--ueditor--><script type="text/javascript" src="/Public/Plugs/ueditor/ueditor.config.js"></script><script type="text/javascript" src="/Public/Plugs/ueditor/ueditor.all.js"></script><link rel="stylesheet" type="text/css" href="/Public/Plugs/ueditor/third-party/video-js/video-js.css"><script type="text/javascript" src="/Public/Plugs/ueditor/third-party/video-js/video.js"></script><!--app--><link rel="stylesheet" type="text/css" href="/Public/Admin/css/style.css"/><script type="text/javascript" src="/Public/Admin/js/common_admin.js"></script>
    
</head>
<body>

<div class="g-page-in">
        <div class="clearfix">        <div class="float-left">            <div class="u-breadcrumb">                <a class="back" href="javascript:window.location.reload()" ><span class="fa fa-repeat"></span> 刷新</a>                <span class="name">站点设置</span>            </div>        </div>        <div class="float-right">            <a href="<?php echo U('Setting/add');?>" role="button" class="btn btn-primary btn-sm"><i class="fa fa-plus"></i> 新增字段</a>        </div>    </div>    <div class="h15"></div><form action="" method="post">    <?php if(is_array($setlist)): $i = 0; $__LIST__ = $setlist;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): $mod = ($i % 2 );++$i; if(($vo["widget"]) == "input_text"): ?><div class="form-group formitem" id="formitem_<?php echo ($vo["id"]); ?>">                <label for="<?php echo ($vo["key"]); ?>"><?php echo ($vo["name"]); ?><span class="text-muted">（键:<?php echo ($vo["key"]); ?>,排序:<?php echo ($vo["sort"]); ?>）</span>                    <?php if(($vo["type"]) == "0"): ?><span class="text-success">系统字段</span><?php endif; ?>                    <?php if(($vo["type"]) == "1"): ?><span class="operate dis_none"><a href="<?php echo U('Setting/edit',array('id'=>$vo['id']));?>" class="text-primary">参数属性</a>&nbsp;&nbsp;&nbsp;&nbsp;<a href="#" class="text-primary" onclick="return del('<?php echo ($vo["id"]); ?>')">删除</a></span><?php endif; ?>                </label>                <input type="text" class="form-control" id="<?php echo ($vo["key"]); ?>" name="<?php echo ($vo["key"]); ?>" placeholder="<?php echo ($vo["value"]); ?>" style="width:400px;" value="<?php echo ($vo["value"]); ?>" />                <small class="form-text text-muted">                    <?php if(!empty($vo["tip"])): echo ($vo["tip"]); endif; ?>                </small>            </div><?php endif; ?>        <?php if(($vo["widget"]) == "textarea"): ?><div class="form-group formitem" id="formitem_<?php echo ($vo["id"]); ?>">                <label for="<?php echo ($vo["key"]); ?>"><?php echo ($vo["name"]); ?><span class="text-muted">（键:<?php echo ($vo["key"]); ?>,排序:<?php echo ($vo["sort"]); ?>）</span>                    <?php if(($vo["type"]) == "0"): ?><span class="text-success">系统字段</span><?php endif; ?>                    <?php if(($vo["type"]) == "1"): ?><span class="operate dis_none"><a href="<?php echo U('Setting/edit',array('id'=>$vo['id']));?>" class="text-primary">参数属性</a>&nbsp;&nbsp;&nbsp;&nbsp;<a href="#" class="text-primary" onclick="return del('<?php echo ($vo["id"]); ?>')">删除</a></span><?php endif; ?>                </label>                <textarea class="form-control" id="<?php echo ($vo["key"]); ?>" rows="3" name="<?php echo ($vo["key"]); ?>" style="width:400px;"><?php echo ($vo["value"]); ?></textarea>                <small class="form-text text-muted">                    <?php if(!empty($vo["tip"])): echo ($vo["tip"]); endif; ?>                </small>            </div><?php endif; endforeach; endif; else: echo "" ;endif; ?>    <button type="submit" class="btn btn-primary">保存</button>	<script>		//ajax删除配置项		function del($id){			$.confirm({text:"确认删除？"},function(){				$.ajax({					type:"post",					url:"<?php echo U('Setting/ajax_del');?>",					data:{id:$id},					success:function(data){						if(data){							$.ktext({text:"操作成功！",delay:1200},function(){								$("#formitem_"+$id).fadeOut(100);							});						}					}				});			});			return false;		}		//鼠标移动显示操作按钮		$(".formitem").find('.operate').hide();		$(".formitem").hover(function(){			$(this).find('.operate').show();		},function(){			$(this).find('.operate').hide();		});	</script></form>
</div>

<script type="text/javascript" src="/Public/Admin/js/my.js"></script>
</body>
</html>